Re-export CredentialConfigTarget and StructuredBaseUrlSource from credential-shaping - #94
Merged
Merged
Conversation
…dential-shaping The bridge's re-export list fell behind ai-credentials/types when the reader signatures on CredentialConfig moved from string to CredentialConfigTarget, so consumers of the documented entry point couldn't name either type.
Member
Author
|
just gonna take the liberty to merge without review since it's just a small re-export change 🤪 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ai-provider-bridge/credential-shapingis documented as re-exporting the public API ofai-credentials/typesunchanged. Two types that the re-exported API references were missing from the list, so consumers can't name them:CredentialConfigTarget— every method on the re-exportedCredentialConfigtakes one (getBaseUrl,getCustomHeaders,getAws,getSnowflake,getDatabricks)StructuredBaseUrlSource— the type ofAuthProviderMapping.structuredBaseUrl, also re-exportedIntroduced in 6a3ef17 (#71), which added
CredentialConfigTargetand changed the reader signatures fromstringto it, without updating this re-export list.Why it matters
A consumer implementing
CredentialConfigcan write the object literal fine (contextually typed), but factoring out a helper needs to name the type — and can't, since it's not exported here. Positron's headless language-model facade hit this and worked around it withParameters<CredentialConfig['getBaseUrl']>[0]instead of importing the type directly, since this entry point is its one seam into the bridge.needed for posit-dev/positron#15675
Test plan
npm run build(all three workspaces)npm run check-types(all three workspaces + shape guard)